#include "img_struct.h"

statistics_config_t s5k5b3gx_tile_config = {
	1,
	1,

	24,
	16,
	128,
	48,
	160,
	250,
	160,
	250,
	0,
	16383,

	12,
	8,
	0,
	8,
	340,
	512,

	8,
	5,
	256,
	10,
	448,
	816,
	448,
	816,

	0,
	16383,
};

line_t s5k5b3gx_50hz_lines[] = {
		{
		{{SHUTTER_1BY8000, ISO_100, 0}}, {{SHUTTER_1BY100, ISO_100,0}}
		},

		{
		{{SHUTTER_1BY100, ISO_100, 0}}, {{SHUTTER_1BY100, ISO_300, 0}}
		},

		{
		{{SHUTTER_1BY50, ISO_100, 0}}, {{SHUTTER_1BY50, ISO_800,0}}
		},

		{
		{{SHUTTER_1BY30, ISO_100, 0}}, {{SHUTTER_1BY30, ISO_6400,0}}
		}
};

line_t s5k5b3gx_60hz_lines[] = {
		{
		{{SHUTTER_1BY8000, ISO_100, 0}}, {{SHUTTER_1BY120, ISO_100,0}}
		},

		{
		{{SHUTTER_1BY120, ISO_100, 0}}, {{SHUTTER_1BY120, ISO_300, 0}}
		},

		{
		{{SHUTTER_1BY60, ISO_100, 0}}, {{SHUTTER_1BY60, ISO_800,0}}
		},

		{
		{{SHUTTER_1BY30, ISO_100, 0}}, {{SHUTTER_1BY30, ISO_6400,0}}
		}
};

img_awb_param_t s5k5b3gx_awb_param = {
	{
		{1450, 1024, 1450},	//AUTOMATIC
		{920	, 1024, 2350},	//INCANDESCENT
		{1050, 1024, 2050},	//D4000
		{1250, 1024, 1620},	//D5000
		{1450, 1024, 1450},	//SUNNY
		{1500, 1024, 1350},	//CLOUDY
		{1598, 1024, 1875},	//FLASH
		{1024, 1024, 1024},	//FLUORESCENT
		{1024, 1024, 1024},	//FLUORESCENT_H
		{1024, 1024, 1024},	//UNDER WATER
		{1024, 1024, 1024},	//CUSTOM
		{1450, 1024, 1450},	//AUTOMATIC OUTDOOR
	},
	{
		12,
		{{ 600, 1600, 1700, 3200, -1800, 2900, -1800, 5000, 1000, 1100, 1000,  2400, 1 },	// 0	INCANDESCENT
		 {  650, 1800, 1400, 2650, -1800, 2900, -1800, 5000, 1000,   600, 1000,  1400, 2 },	// 1    D4000
		 {  800, 2000, 1100, 2400, -1800, 2900, -2000, 5300, 1000,       0, 1000,    700, 4 },	// 2	 D5000
		 {1000, 2200, 1000, 2100, -1500, 2600, -2000, 5300, 1000, -250, 1000,    250, 8 },	// 3    SUNNY
		 {1100, 2300, 900, 1900,   -1200, 2300, -1500, 4400, 1000,-1000, 1000,   100, 4 },	// 4    CLOUDY
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 5    PROJECTOR
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 6	GREEN REGION
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 7    FLASH
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 8	FLUORESCENT
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 9    FLUORESCENT_2
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 10	FLUORESCENT_3
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 }},
	},
	{	{ 0 ,6},	//LUT num. AUTOMATIC  INDOOR
		{ 0, 1},	//LUT num. INCANDESCENT
		{ 1, 1},	//LUT num. D4000
		{ 2, 1},	//LUT num. D5000
		{ 2, 5},	//LUT num. SUNNY
		{ 4, 3},	//LUT num. CLOUDY
		{ 7, 1},	//LUT num. FLASH
		{ 8, 1},	//LUT num. FLUORESCENT
		{ 9, 1},	//LUT num. FLUORESCENT_H
		{11, 1},	//LUT num. UNDER WATER
		{11, 1},	//LUT num. CUSTOM
		{ 0, 7},	//LUT num. AUTOMATIC  OUTDOOR
	 }
};
u32 s5k5b3gx_ae_agc_dgain[769]={
		1080,
		1037,1041,1046,1056,1060,1065,1076,1077,1044,1050,1052,1060,1062,1070,1075,1079,
		1047,1050,1055,1064,1069,1076,1080,1087,1046,1052,1057,1063,1068,1076,1081,1086,
		1055,1062,1066,1072,1077,1081,1089,1094,1058,1066,1070,1077,1082,1089,1095,1098,
		1058,1065,1069,1078,1083,1091,1096,1106,1068,1074,1079,1086,1088,1097,1098,1104,
		1059,1063,1071,1078,1082,1090,1098,1107,1063,1069,1074,1081,1085,1087,1096,1099,
		1051,1057,1063,1068,1078,1083,1090,1093,1060,1065,1074,1079,1082,1087,1093,1099,
		1046,1052,1057,1066,1072,1078,1084,1089,1006,1011,1011,1018,1024,1029,1035,1038,
		998,1006,1014,1021,1026,1030,1036,1042,1018,1020,1026,1030,1037,1041,1048,1052,
		1003,1011,1018,1023,1030,1034,1041,1051,1003,1008,1013,1019,1025,1029,1036,1045,
		1016,1022,1028,1035,1041,1045,1053,1053,1001,1007,1013,1018,1024,1028,1038,1043,
		1011,1018,1024,1074,1080,1088,1089,1095,1060,1067,1070,1078,1084,1092,1099,1106,
		1052,1059,1064,1071,1078,1082,1086,1091,1053,1059,1064,1069,1078,1083,1090,1097,
		1053,1059,1066,1069,1076,1081,1087,1092,1050,1057,1061,1066,1072,1078,1084,1090,
		1035,1040,1048,1055,1061,1065,1071,1077,1054,1058,1065,1069,1076,1082,1087,1093,
		1043,1052,1057,1064,1069,1077,1081,1087,1025,1031,1037,1043,1048,1054,1060,1065,
		1043,1048,1054,1059,1066,1071,1077,1081,1055,1060,1067,1072,1077,1084,1090,1096,
		1014,1019,1025,1032,1036,1043,1049,1055,1025,1031,1036,1042,1048,1052,1057,1063,
		1034,1038,1046,1051,1061,1065,1071,1077,1004,1010,1015,1020,1022,1028,1034,1039,
		1006,1011,1018,1026,1031,1038,1042,1048,1015,1019,1025,1027,1034,1039,1045,1051,
		996,1002,1009,1015,1021,1027,1032,1038,1001,1005,1010,1015,1021,1026,1031,1037,
		996,1001,1007,1012,1019,1025,1031,1036,994,999,1005,1009,1015,1020,1026,1031,
		981,985,990,996,1001,1006,1013,1019,1025,1030,1035,1041,1047,1051,1056,1062,
		1014,1019,1024,1031,1036,1042,1050,1055,1020,1026,1030,1036,1041,1045,1050,1056,
		1015,1021,1027,1032,1040,1046,1052,1057,1017,1023,1028,1033,1036,1042,1048,1054,
		1013,1019,1024,1032,1038,1044,1049,1055,1011,1016,1020,1025,1031,1037,1043,1048,
		1008,1014,1022,1028,1033,1039,1044,1050,1011,1013,1019,1009,1015,1036,1042,1048,
		1009,1014,1020,1025,1031,1036,1043,1048,1004,1009,1015,1021,1026,1032,1038,1047,
		1006,1011,1016,1022,1027,1033,1035,1041,1002,1008,1014,1019,1023,1030,1039,1046,
		1004,1009,1014,1020,1026,1028,1032,1038,1000,1005,1010,1016,1024,1031,1037,1042,
		1003,1007,1014,1019,1021,1026,1031,1032,998,1003,1009,1016,1022,1028,1034,1039,
		1001,1007,1012,1015,1020,1026,1031,1020,984,988,995,1002,1007,1013,1018,1023,
		986,990,1010,1015,1021,1026,1032,1037,998,1004,1010,1015,1022,1027,1031,1038,
		999,1004,1010,1015,1021,1026,1032,1036,998,1003,1008,1015,1021,1026,1032,1038,
		1001,1005,1011,1017,1022,1027,1031,1036,998,1004,1010,1015,1020,1029,1034,1040,
		1001,1006,1011,1016,1022,1024,1029,1035,996,1002,1007,1013,1022,1027,1033,1039,
		998,1004,1009,1011,1017,1022,1028,1033,994,1000,1005,1015,1020,1026,1031,1036,
		996,1002,1004,1009,1015,1021,1025,1031,993,1001,1007,1012,1018,1023,1028,1035,
		996,998,1003,1008,1013,1018,1024,1018,978,1000,1004,1011,1016,1022,1028,1030,
		993,999,1004,1009,1014,1020,1026,1034,994,999,1005,1010,1015,1021,1025,1030,
		992,996,1001,1007,1012,1019,1025,1031,993,998,1004,1010,1014,1020,1024,1030,
		991,997,1001,1007,1013,1019,1024,1030,992,997,1003,1009,1014,1019,1024,1030,
		992,997,1002,1006,1012,1018,1024,1029,991,997,1005,1010,1015,1020,1025,1031,
		992,995,1000,1006,1012,1017,1022,1027,990,999,1004,1010,1015,1021,1027,1032,
		991,996,1001,1007,1012,1017,1023,1031,992,998,1003,1009,1014,1020,1026,1030,
		991,996,1002,1007,1013,1017,1024,1029,991,997,1002,1008,1014,1020,1026,1031,
		992,997,1002,1008,1013,1016,1023,1028,989,995,1001,1007,1010,1004,1010,1015,
		977,982,988,990,1010,1016,1022,1028,988,994,1002,1007,1013,1018,1023,1029,
		990,995,997,1004,1008,1015,1021,1026,988,995,1000,1005,1012,1017,1022,1024,
};
u32 s5k5b3gx_ae_sht_dgain[1036] =//1080p
{

	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,
	1024,1022,1024,1050,1044,1039,1034,1029,1024,1049,1043,1039,1030,1024,1050,1044,
	1040,1034,1029,1024,1051,1046,1042,1035,1030,1024,1052,1046,1041,1035,1030,1024,
	1052,1047,1043,1039,1034,1029,1024,1056,1050,1044,1035,1029,1024,1056,1050,1045,
	1040,1035,1029,1024,1058,1057,1051,1044,1038,1031,1024,1060,1055,1050,1045,1038,
	1033,1028,1024,1060,1053,1047,1041,1035,1030,1024,1062,1057,1052,1046,1041,1035,
	1029,1024,1064,1058,1054,1049,1045,1040,1034,1029,1024,1068,1061,1053,1047,1042,
	1035,1030,1024,1069,1063,1057,1051,1052,1047,1041,1036,1030,1024,1072,1066,1060,
	1055,1046,1041,1035,1030,1024,1076,1069,1064,1058,1053,1054,1048,1041,1036,1029,
	1024,1079,1074,1068,1063,1054,1048,1042,1038,1032,1029,1024,1082,1077,1072,1067,
	1060,1055,1049,1042,1036,1030,1024,1085,1079,1072,1068,1062,1058,1052,1047,1041,
	1036,1029,1024,1089,1084,1077,1072,1066,1061,1055,1050,1044,1039,1035,1034,1029,
	1024,1097,1093,1087,1082,1077,1071,1065,1055,1050,1045,1040,1034,1030,1024,1103,
	1098,1091,1092,1087,1081,1075,1069,1061,1056,1051,1044,1038,1030,1024,1112,1106,
	1101,1097,1092,1088,1084,1079,1071,1066,1060,1053,1047,1041,1036,1029,1024,1120,
	1121,1115,1110,1102,1094,1090,1082,1075,1070,1063,1054,1048,1042,1038,1033,1030,
	1024,1135,1130,1124,1114,1109,1104,1098,1091,1086,1082,1076,1071,1068,1065,1059,
	1053,1047,1042,1035,1029,1024,1150,1144,1138,1139,1133,1126,1120,1112,1107,1099,
	1092,1088,1078,1073,1069,1065,1060,1054,1050,1044,1036,1031,1024,1164,1158,1152,
	1148,1142,1137,1132,1128,1124,1119,1113,1107,1100,1093,1089,1082,1076,1072,1066,
	1059,1061,1054,1047,1042,1035,1030,1024,1190,1182,1177,1175,1172,1166,1160,1155,
	1148,1141,1136,1131,1124,1113,1108,1104,1097,1093,1089,1085,1080,1075,1071,1060,
	1055,1048,1043,1037,1031,1024,1224,1217,1211,1206,1207,1201,1194,1189,1183,1175,
	1170,1163,1157,1152,1146,1141,1138,1133,1125,1121,1116,1111,1105,1100,1088,1083,
	1077,1069,1064,1058,1053,1046,1043,1035,1035,1030,1024,1270,1250,1230,1212,1187,
	1169,1148,1123,1105,1083,1065,1044,1024,
};
u8 s5k5b3gx_dlight[2] = {128,4};